﻿Imports System.Web.UI
Imports SISSAT.Administration.Views

Namespace Pages.Administration

    'TODO: Remove mock class
    Public Class ScheduleTimeDataView
        Property SubjectId As Integer
        Property StartTime As String
        Property EndTime As String

        Public Sub New(subjectId As Integer, startTime As String, endTime As String)
            Me.SubjectId = subjectId
            Me.StartTime = startTime
            Me.EndTime = endTime
        End Sub
    End Class

    Public Class Schedules
        Inherits Page
        Implements IScheduleView

#Region "Fields"



#End Region

#Region "Properties"

        Private Property ScheduleTimesDataSource As IEnumerable(Of ScheduleTimeDataView)

#End Region

#Region "IScheduleView Members"



#End Region

#Region "Methods"

        Private Sub InitializeComponents()
            Dim subjectId As Integer = 0
            Dim times As IList(Of ScheduleTimeDataView) = New List(Of ScheduleTimeDataView)
            times.Add(New ScheduleTimeDataView(subjectId, "07:30 AM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "09:00 AM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "10:30 AM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "12:00 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "01:30 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "03:00 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "04:30 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "06:00 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "07:30 PM", ""))
            times.Add(New ScheduleTimeDataView(subjectId, "09:00 PM", ""))

            ScheduleTimesDataSource = times
        End Sub

#End Region

#Region "Events"

        Private Sub PageInit(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Init
            'TODO: Mock InitializeComponents()

            ScheduleRepeater.DataSource = ScheduleTimesDataSource
            ScheduleRepeater.DataBind()
        End Sub

#End Region

    End Class

End Namespace
